<% @page_title = @card.title %>
<% @header_class = "header--card" %>

<% content_for :head do %>
  <%= card_social_tags(@card) %>
<% end %>

<% content_for :header do %>
  <div class="header__actions header__actions--start">
    <%= link_back_to_board(@card.board) %>
  </div>
<% end %>

<%= turbo_stream_from @card %>
<%= turbo_stream_from @card, :activity %>

<div data-controller="beacon lightbox" data-beacon-url-value="<%= card_reading_path(@card) %>">
  <%= render "cards/container", card: @card %>
  <%= render "cards/messages",  card: @card unless @card.drafted? %>

  <%= render "layouts/lightbox" do %>
    <%= button_to_remove_card_image(@card) if @card.image.attached? %>
  <% end %>
</div>
